ComDeX Wiki

Version 0.2.7

ComDeX Wiki: A (Mostly) Complete Guide to Harnessing its Potential

Configuration and Usage

Below are the details to configure and use ComDeX through its command-line interface and to set up broker federations using MQTT bridges.

Command-Line Usage

ComDeX provides a flexible command-line interface for managing entities, subscriptions, and other operations.

Usage:
        python3 actionhandler.py [options]
        

Options

Option Long Form Description
-h --help Show help information about available commands and options.
-c --command Specify the operation to perform. Possible commands include:
  • POST/entities
  • POST/Subscriptions
  • DELETE/entities/
  • PATCH/entities/
  • GET/entities/
  • entityOperations/delete
  • entityOperations/create
  • entityOperations/update
  • entityOperations/upsert
-f --file Specify the input file for the command (e.g., an entity configuration file).
-b --broker_address Specify the MQTT broker address for the ComDeX node.
-p --port Specify the port number of the MQTT broker for the ComDeX node.
-q --qos Define the Quality of Service level (0, 1, or 2) for the command.
-H --HLink Provide the context link (HLink) for the GET request.
-A --singleidadvertisement Set to 1 to enable single ID advertisement; default is 0.

Example:

python3 actionhandler.py -c POST/entities -f entity.ngsild -b localhost -p 1026 -q 1 -H HLink -A 0
        

Setting Up Broker Federations

ComDeX supports MQTT-based broker federation for propagating context between brokers. The implementation relies on advertisement messages containing:

  • Provider ID
  • Broker address and port
  • Region covered
  • NGSI-LD entity context and type

Configuration Guidelines

To set up a federation:

  1. Configure MQTT bridges between brokers using advertisement messages to propagate exported contexts.
  2. Ensure proper filtering to avoid redundant message transmissions and network overload.
  3. Avoid bidirectional linkages in MQTT bridges to reduce network loops.

Example MQTT Broker Configuration

# Mosquitto .conf example for allowing all advertisements
        max_queued_messages 4000
        persistence true
        persistence_location ./Port_Area_B_Broker/
        log_dest stdout
        listener 1029 localhost
        allow_anonymous true
        
        connection Port_Area_B_Broker_to_Port_Administration_Central_Broker
        address localhost:1026
        topic provider/# out 2 "" ""
        

With this configuration, the broker propagates advertisements and entity data as defined.

Last updated on 8 Jun 2023
Published on 8 Jun 2023